You are here: 1. Distribution System > 1.10. MAINTENANCE Menu: System Maintenance > 1.10.6. Maintenance - Import Data > 1.10.6.1. Import Data - Specifying the Import Details > Adding Variables
Adding Variables

You use the EDIT | VARIABLE menu options on the Import Procedure screen to select individual fields and variables from the Micronet master file to import data into. You can also specify selection criteria for the data you want to import, and you can import calculation fields.

To add variables to your data import procedure:

  1. Open the Import Procedure screen and specify your import details.

Refer to "Import Data - Specifying the Import Details".

  1. Select EDIT | VARIABLE.
  2. Select the Add button.

Micronet displays the Enter Field screen.

  1. Complete the following fields:

 

Field

Value

 

Into Field

Select the field in the Micronet master file that you want data imported into.

 

Import Mode

Select the update method for the data you are importing into the field. Options are:

  • Add/Update - Micronet will either add the record if it doesn’t exist, or update it with new information if the record exists
  • Add Only - Micronet will only add new records; if the record currently exists, then the details will remain unchanged
  • Update Only - Micronet will only update existing records; if the record does not exist, the details will not be added.

 

Field Type

Select the type of field. Options are:

  • Field - import standard data into a normal field
  • Calculation - perform calculations on one or more fields and import the result. See Using Calculations below for examples of how to use this type of field.
  • Import If - specify that only data matching certain criteria should be imported. See Using Import If below for an example of how to use this type of field.

 

File Position

Enter the file position values you wish to import into this field.

 

Field Size

 

 

Decimal Places

If the field is numeric, enter the number of decimal places to import.

 

Add Numbers

 

 

Date Format

 

 

Calculation

If you selected Calculation or Import If as the Field Type, enter the calculation data or selection logic.

  1. Select the Accept button.

Micronet redisplays the Import Procedure screen.

 

Using Calculations

You set the Field Type to Calculation if you want Micronet to perform calculations on one or more fields during the import and then import the results.

 

Example 1: Set all the ITM_CLASS fields to 02

  1. On the Enter Field screen, set the Into Field to ITM_CLASS.
  1. Set the Import Mode field to Add/Update.
  1. Set the Field Type to Calculation.
  1. Enter "002" in the Calculation field.

  1. Select the Accept button.

 

Example 2: Set all the ITM_RETAIL0 to the average cost multiplied by 1.2

  1. On the Enter Field screen, set the Into Field to ITM_RETAIL0.
  1. Set the Import Mode field to Add/Update.
  1. Set the Field Type to Calculation.
  1. Enter "ITM_ACOST * 1.2" in the Calculation field.

  1. Select the Accept button.

 

Using Import If

You set the Field Type to Import If if you want Micronet to apply some selection or update logic on records to be imported.

 

Example: Only import record where the ITM_CAT == 0001

  1. On the Enter Field screen, set the Into Field to ITM_CAT.
  1. Set the Import Mode field to Add/Update.
  1. Set the Field Type to Import If.
  1. Enter "ITM_CAT==0001" in the Calculation field.

  1. Select the Accept button.